import qs from 'qs';
import axios from 'axios';
const instance = axios.create()
const myAxios = {
    get(url,params){
        /**
         * @param {object} params
         * @param {string} url
         */
        return instance({
            url,
            method:'GET',
            params,
        })
    },
    post(url,data){
        return instance({
            url,
            method:'POST',
            data:qs.stringify(data)
        })
    }
}
export default myAxios